package com.yamed.bus.web.vo;


public class ResponseVO {

    private String code;
    private String msg;
    private Object data;

    public static ResponseVO success(){
        ResponseVO responseVO = new ResponseVO();
        responseVO.setCode("0000");
        responseVO.setMsg("操作成功");
        return responseVO;
    }
    public static ResponseVO error(){
        ResponseVO responseVO = new ResponseVO();
        responseVO.setCode("9999");
        responseVO.setMsg("操作失败");
        return responseVO;
    }
    public static ResponseVO error(String msg){
        ResponseVO responseVO = new ResponseVO();
        responseVO.setCode("9999");
        responseVO.setMsg(msg);
        return responseVO;
    }
    public static ResponseVO success(Object data){
        ResponseVO responseVO = new ResponseVO();
        responseVO.setCode("0000");
        responseVO.setMsg("操作成功");
        responseVO.setData(data);
        return responseVO;
    }
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
